﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Huioo.Learning.CSharp.Abstractions
{
    public abstract class ModelUsing : IModelUsing
    {
        private readonly IList<string> _logMessages = new List<string>();

        public IList<string> LogMessages => _logMessages;

        public abstract void Run();

        protected void ClearLog()
        {
            LogMessages.Clear();
        }

        protected void AddLog(string message)
        {
            LogMessages.Add(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:fffffff"));
            LogMessages.Add(message);
        }
    }
}
